package com.kws.merchant.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author : zhangbenting
 * @date : 2024/10/31 17:12
 * @Version: 1.0
 */

@TableName(value = "tb_shop_cart")
@Data
public class ShopCartEntity implements Serializable {

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("主键ID")
    private Long id;

    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    private Long userId;

    /**
     * 商品id
     */
    @ApiModelProperty("商品id")
    private Long deviceId;

    @ApiModelProperty("商家id")
    private Long merchantId;

    /**
     * 规格id
     */
    @ApiModelProperty("规格id")
    private Long specificationId;

    /**
     * 商品类型
     */
    @ApiModelProperty("商品类型(0设备 1服务)")
    private Integer  type;

    /**
     * 商品数量
     */
    @ApiModelProperty("商品数量")
    private Integer goodsCount;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}
